# -*- coding:utf-8 -*-
import string
from console import printC
allchars = string.maketrans('','')
def makefilter(keep):
	delChar = allchars.translate(allchars,keep)
	# printC(delChar)
	def thefilter(s):
		"""docstring for thefilter"""
		return s.translate(allchars,delChar)
	return thefilter
if __name__ == '__main__':
	f = makefilter(string.digits)
	print f('tesfa1234asf4 fa24')
	q = makefilter('的')
	s = q('tesf王个大法的ff')
	print unicode(s,'utf-8')
#	printC(s)
